#ifndef FMTABLEVIEW_H
#define FMTABLEVIEW_H

#include <QObject>

#include <QTableView>
#include <QWidget>
#include <QStandardItemModel>
#include <QStandardItem>
#include <QKeyEvent>

#include "kemode/mode/kefootmark.h"
#include "kemode/ibatis/MyPageParams.h"


namespace kepen {
namespace core {

class FmTableView : public QTableView
{
    Q_OBJECT

public:
    FmTableView(QWidget *parent);
    ~FmTableView();
protected:
    void keyPressEvent(QKeyEvent *event)override;
public:
    void refreshBy(kepen::kemod::KeFootmark* node);

    void setData(int startIndex,int count,kepen::kemod::KeFootmark*vs);
    int getColumn4ID()const{return 0;}


    QString getSelectedNodeID();
    void getSelectedNodeIDs(std::vector<kepen::kemod::IdVersionTag> &vs);
private:
    void node2UI(QStandardItemModel *theModel,kepen::kemod::KeFootmark *node,int displayIndex);
    void keyPressUpDown(int key);
Q_SIGNALS:
    void keyPress4Page(int key);

};


}
}


#endif // FMTABLEVIEW_H
